<?php
           

ob_clean();



    $cate = array();

$pid=!empty($_GET['id'])?$_GET['id']:0;

$sql = "select * from `cate` where pid=$pid";

$result = mysqli_query($link,$sql);

while ($arr = mysqli_fetch_assoc($result)) {
  $cate[]=$arr;
  # code...
}


if(!empty($_SERVER['HTTP_X_REQUESTED_WITH'])){



echo json_encode($cate);die;

}









// 分类数据结构重组
    // $cate = getCate();

            
    
//链接news-list.html页面实现视图分离
include (VIEW_PATH.$admin.'layout.html');
 ?>